{% extends "admin/base.html" %}

{% block main %}
	<div class='main'>
	{% if comment %}
		<table class='form'>
		<tr>
			<th width='120'>作者：</th>
			<td><strong>{{ comment.author }}</strong></td>
		</tr>
		<tr>
			<th>电子邮件/Email：</th>
			<td>{{ comment.email }}</td>
		</tr>
		<tr>
			<th>主页/Url：</th>
			<td>{{ comment.sourceurl }}</td>
		</tr>
		<tr>
			<th>评论时间：</th>
			<td>{{ comment.createdate_dt }}</td>
		</tr>
		<tr>
			<th>评论内容：</th>
			<td>{{ comment.content }}</td>
		</tr>
		{% if comment.clientip %}
		<tr>
			<th>IP：</th>
			<td>{{ comment.clientip }}</td>
		</tr>
		{% endif %}
		<tr>
			<th>&nbsp;</th>
			<td><a href='/admin/comments/{{ comment.id }}/delete/' class='del'>删除本条评论</a></td>
		</tr>
		</table>
		{% if post %}
		<h4>文章“<a href='/p/{{ post.id }}/' target='_blank'>{{ post.subject }}</a>”的全部评论: </h4>
			{% if all_comments %}
			{% for c in all_comments %}
				<p>
				{% if c.id== comment.id %}<span class='indicator'>&raquo;</span> <strong>{{ c.author }}</strong>{% else %}{{ c.author }}{% endif %}: &nbsp;
				<a href='/admin/comments/{{ c.id }}/'>{{ c.content|truncate(length=30, killwords=True, end='...') }}</a>
				<span class='date'>{{ c.createdate_dt }}</span>
				</p>
			{% endfor %}
			{% endif %}
		{% endif %}
	{% else %}
		<span class='notify'>指定的评论没有找到。</span>
	{% endif %}
	</div>
{% endblock %}